% Test LDA classification and feature deduction
clear;close;

%generate data
mu1=[1,3];
sigma1=[1, 1.5;1.5, 3];
data1=mvnrnd(mu1, sigma1, 100);

mu2=[2, 8];
sigma2=[1.5, 0.3;0.3, 1];
data2=mvnrnd(mu2, sigma2, 100);

hold;
plot(data1(:,1), data1(:,2), 'c.');
plot(data2(:,1), data2(:,2), 'b.');

%concatenate data
data=[data1; data2];
target=[zeros(length(data1),1); ones(length(data2),1)];

%LDA
w=LDA(data, target);

